Reference for Bava Batra 106:5
החזיק בפנימי לקנותו קנאו לקנות אותו ואת החיצון קנה שניהן לקנות את החיצון אף פנימי לא קנה
then if a man takes possession of the outer room with the idea of becoming its owner, he acquires ownership of it; if with the idea of becoming owner of both rooms, he acquires ownership of the outer room but not of the inner one; if with the idea of becoming owner of the inner room, he does not acquire ownership even of the outer one. If he takes possession of the inner one with the idea of becoming its owner, he acquires ownership of that one; if with the idea of becoming owner of both, he does acquire ownership of both;<span class="x" onmousemove="('comment',' Because the right of way from the inner room through the outer makes the latter subsidiary to the former. ');"><sup>7</sup></span> if with the idea of becoming owner of the outer one [only], he does not acquire ownership even of the inner one.<span class="x" onmousemove="('comment',' V. supra p. 218, n. 5. ');"><sup>8</sup></span>